//
//  RecordIndexer.h
//  SimulacraDB
//
//  Created by Andre Cohen on 9/3/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "Paging.h"
#import "BTree.h"

@interface RecordIndexer : BTree {
	int block;
	Paging *dataSource;
	Record *prototype;
	NSString *file;
}

@property(readonly) int block;
@property Paging *dataSource;

- (id)initIndexerByBlock:(int)recordBlock
			withFileName:(NSString *)filename
		   withDataSouce:(Paging *)source 
		 recordPrototype:(Record *)record;

- (void)close;

- (NSArray *)getRecord:(Record *)record;
- (BTreeNode *)getLeafForRecord:(Record *)record;


@end
